<template>
  <div class="first">
    <p>御剑乘风来,除魔天地间!===first</p>
    <div class="main">
      <div class="left">
        <ul>
          <li v-for="(item, index) in 2" :key="index">
            <button @click="page(item)">page{{ item }}</button>
          </li>
        </ul>
      </div>
      <div class="right">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "",
  data() {
    return {
      arr: ["page1", "page2"],
    };
  },
  created() {},
  computed: {},
  methods: {
    page(item) {
      this.$router.push({
        path: "/home/first/page" + item,
      }).catch((err) => {});
    },
  },
};
</script>
<style lang='less'  scoped>
.first {
  p {
    line-height: 50vh;
    text-align: center;
    color: #fff;
    font-weight: bolder;
  }
  .main {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    .right{
      border: 1px solid #000;
    }
    ul{
      width: 100%;
      height: 100%;
    }
  }
}
</style>
